<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page errorPage="error.jsp" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" charset="utf-8" />
        <link rel="stylesheet" href="css/mystyle.css"/>
        <style>
            p{
                font-size: 20px;
            }
        </style>
        <script type="text/javascript">
            function check(){
                var patrn = /^(-)?\d+(\.\d+)?$/;
                if(document.ff.address.value==""||document.ff.addressee.value==""||document.ff.phone.value==""||document.ff.zipcode.value==""){
                    alert("地址信息不能为空！");
                    return false;
                }if((patrn.exec(document.ff.zipcode.value) == null)||(document.ff.zipcode.value<=0)){
                    alert("邮编输入错误！");
                    return false;
                }
                return true;
            }
        </script>
    </head>
    <body>
        <div class="container">
            <h1 class="text-primary text-center">添加收货地址</h1>
            <div class="bg-success RegisterForm">
            <form action="aas" name="ff" onsubmit="return check()">
                <p>详细地址：</p><input class="form-control" style="width:300px" type="text" name="address"><br><br>
                <p>收件人：</p><input class="form-control" style="width:300px" type="text" name="addressee"><br><br>
                <p>电话：</p><input class="form-control" style="width:300px" type="text" name="phone"><br><br>
                <p>邮编：</p><input class="form-control" style="width:300px" type="text" name="zipcode"><br><br>
                <button class="btn btn-default">添加</button>
            </form>
            </div>
            <a href="Member.jsp?name=<%=request.getParameter("name")%>" class="btn btn-sm btn-warning text-center">返回个人主页</a>
        </div>
        
        
        
    </body>
</html>